package cc.comac.mom.bean.lifelimit;

import lombok.Data;

import java.util.Date;

/**
 * @author Leong
 * @date 2020-08-19 17:27
 */
@Data
public class LifeLimitPrintResultBean {


    public LifeLimitPrintResultBean(Integer status, String msg, Object qar) {
        this.status = status;
        this.msg = msg;
        this.qar = qar;
    }

    private Integer status;//0/1
    private String msg;//失败原因
    private Object qar;
    public static LifeLimitPrintResultBean success(Object data) {
        return LifeLimitPrintResultBean.success("操作成功" , data);
    }
    public static LifeLimitPrintResultBean success(String msg, Object data) {
        return new LifeLimitPrintResultBean(1, msg, data);
    }
    public static LifeLimitPrintResultBean error(String msg) {
        return LifeLimitPrintResultBean.error(msg, null);
    }
    public static LifeLimitPrintResultBean error(String msg, Object data) {
        return new LifeLimitPrintResultBean(0, msg, data);
    }
}
